package bridge.pattern.demo;

/**
 * Created by 逸足天涯
 * Date: 2019/10/21.
 * Time: 11:12
 */
public class BridgePatternEx {
    public static void main(String[] args) {
        System.out.println("****Bridge Pattern******");

        System.out.println("\nColoring Triangle");
        IColor green = new GreenColor();
        Shape triangleShape = new Triangle(green);
        triangleShape.drawShape(20);
        triangleShape.modifyBorder(20,3);

        System.out.println("\nColoring Triangle");
        IColor red = new RedColor();
        Shape rectangleShape = new Rectriangle(red);
        rectangleShape.drawShape(50);
        rectangleShape.modifyBorder(50,2);


    }
}
